﻿<phone:PhoneApplicationPage 
    x:Class="Sparpotify7.View.MainPanorama"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:unsupported="clr-namespace:Microsoft.Phone.Controls.Unsupported"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False">

    <!--LayoutRoot contains the root grid where all other page content is placed-->
    <phone:PhoneApplicationPage.Resources>
        <unsupported:BooleanToVisibilityConverter x:Name="booleanToVisibilityConverter"/>
    </phone:PhoneApplicationPage.Resources>
    <Grid x:Name="LayoutRoot">
        <StackPanel>
            <ProgressBar Width="500" IsIndeterminate="True" Height="10" Style="{StaticResource PerformanceProgressBar}" Visibility="{Binding IsWorking, Converter={StaticResource booleanToVisibilityConverter}}" VerticalAlignment="Stretch" />
        </StackPanel>
        <controls:Panorama>
            <controls:Panorama.Title>
                <StackPanel>
                    <TextBlock Text="sharpotify7"/>
                </StackPanel>
            </controls:Panorama.Title>
            
            <!--Panorama item one-->
            <controls:PanoramaItem Header="My Playlists">
                <ListBox Margin="0,0,-12,0" ItemsSource="{Binding PlayListItems, Mode=OneWay}" SelectedItem="{Binding SelectedPlayList, Mode=TwoWay}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Margin="0,0,0,17" Width="432" MinHeight="78">
                                <TextBlock Text="{Binding LineOne}" TextWrapping="Wrap" Style="{StaticResource PhoneTextLargeStyle}"/>
                                <TextBlock Text="{Binding LineTwo}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PanoramaItem>

            <!--Panorama item two-->
            <controls:PanoramaItem Header="Search">
                <StackPanel>
                    <TextBox Text="{Binding SearchText}" />
                    <Button Content="Search" Command="{Binding SearchCommand}"></Button>
                </StackPanel>
            </controls:PanoramaItem>

            <!--Panorama item tree-->
            <controls:PanoramaItem Header="Top Tracks">
                <ListBox Margin="0,0,-12,0" ItemsSource="{Binding TopTracktItems, Mode=OneWay}" SelectedItem="{Binding SelectedTopTrack, Mode=TwoWay}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Margin="0,0,0,17" Width="432" MinHeight="78">
                                <TextBlock Text="{Binding LineOne}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
                                <TextBlock Text="{Binding LineTwo}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
                                <TextBlock Text="{Binding LineThree}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PanoramaItem>

            <!--Panorama item tree-->
            <controls:PanoramaItem Header="Preferences">
                <Grid/>
            </controls:PanoramaItem>
        </controls:Panorama>
    </Grid>

    <!--Panorama-based applications should not show an ApplicationBar-->

</phone:PhoneApplicationPage>